const WR = require("../lib/v0.0.1").OwhatWrapper;
const path = require("path");


WR.__login("richard123zgy@sohu.com","aaaaaa").then(async o=>{
  let owhat = o.owhat;
  let v = await owhat.verify();
  let o_updir = await owhat.safelyUploadDirByMkblk(
    path.join(__dirname, "../lib"),
    2 * 1024
  )
  let html = o_updir.toHTML()
  debugger
  debugger
})

/** 
WR.__login("hujimiya@ya.ru", "owhat65huji").then(async o => {
  let owhat = o.owhat;
  let v = await owhat.verify();
  // let o_up = await owhat.uploadFile(path.join(`E:\\patricia\\DO-NOT-TRACK\\upload-picture\\tmp`,"990.BIN"))
  // let o_Mkblk = await owhat.uploadFileByMkblk(
  //   path.join(`E:\\patricia\\DO-NOT-TRACK\\upload-picture\\tmp`,"990.BIN"),
  //   5000 * 1024 * 1024
  // )
  let o_updir = await owhat.safelyUploadDirByMkblk(
    path.join(__dirname, "../lib"),
    2 * 1024
  )
  let html = o_updir.toHTML()
  debugger
  // let o_dir= await owhat.safelyUploadDir(path.join(__dirname,"../node_modules/uri-js"))
  // debugger
  // require("../lib/v0.0.1").speed_test(path.join(__dirname,"../README.md"))
  // require("../bin/v0.0.1/speedtest");
  // let get1 = await WR.getValidInstance();
  // await new Promise(r => setTimeout(r, 2000));
  // let get2 = await WR.getValidInstance();
  // console.log(get1.instance === get2.instance)

});

*/
